<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>#{msgs.modifyTimesheet}</title>
        <h:outputStylesheet library="css" name="bootstrap.css"/>
    </h:head>
    <h:body>
        <h2>#{msgs.modifyTimesheet}</h2>
            <h:outputText value="#{msgs.timesheetEmpNumber}" class="strong"/>
            <h:outputText value="#{employeeManager.employee.empID}" style="padding-right: 70px" />
            <h:outputText value="#{msgs.timesheetName}" class="strong"/>
			<h:outputText value="#{employeeManager.employee.empName}"  style="padding-right: 70px"/>
            <h:outputText value="#{msgs.timesheetWeekNumber}" class="strong" />
            <h:outputText value="#{modifyTimesheet.weekNum}" style="padding-right: 70px" />
            <h:outputText value="#{msgs.timesheetWeekEnding}" class="strong" />
            <h:outputText value="#{modifyTimesheet.weekDate}" />
            <br /><br />
			<h:form>
			    <h:dataTable value="#{modifyTimesheet.rows}" var="row" border="2">
                <h:column>
                    <f:facet name="header">#{msgs.timesheetProject}</f:facet>
                    <h:inputText value="#{row.projectName}" id="project" size="10" styleClass="tsProj"/>
                    <f:facet name="footer"></f:facet>
                </h:column>
                <h:message for="project"/>
                <h:column class="tsProj">
                    <f:facet name="header">#{msgs.timesheetWP}</f:facet>
                    <h:inputText value="#{row.wP}" size="10" id="wp" styleClass="tsProj" />
                    <f:facet name="footer">#{msgs.timesheetTotal}</f:facet>
                </h:column>
                <h:message for="wp"/>
                <h:column>
                    <f:facet name="header">#{msgs.timesheetTotal}</f:facet>
                    <h:inputText value="#{row.total}" size="10" readonly="true" styleClass="tsCol" />
                    <f:facet name="footer">#{modifyTimesheet.colTotal}</f:facet>
                </h:column>
                <h:column>
                    <f:facet name="header">#{msgs.timesheetSat}</f:facet>
                    <h:inputText value="#{row.sat}" size="10" id="sat" styleClass="tsCol" />
                    <f:facet name="footer">#{modifyTimesheet.totalSat}</f:facet>
                </h:column>
                <h:message for="sat"/>
                <h:column>
                    <f:facet name="header">#{msgs.timesheetSun}</f:facet>
                    <h:inputText value="#{row.sun}" size="10" id="sun" styleClass="tsCol" />
                    <f:facet name="footer">#{modifyTimesheet.totalSun}</f:facet>
                </h:column>
                <h:message for="sun"/>
                <h:column>
                    <f:facet name="header">#{msgs.timesheetMon}</f:facet>
                    <h:inputText value="#{row.mon}" size="10" id="mon" styleClass="tsCol" />
                    <f:facet name="footer">#{modifyTimesheet.totalMon}</f:facet>
                </h:column>
                <h:message for="mon"/>
                <h:column>
                    <f:facet name="header">#{msgs.timesheetTue}</f:facet>
                    <h:inputText value="#{row.tue}" size="10" id="tue" styleClass="tsCol" />
                    <f:facet name="footer">#{modifyTimesheet.totalTue}</f:facet>
                </h:column>
                <h:message for="tue"/>
                <h:column>
                    <f:facet name="header">#{msgs.timesheetWed}</f:facet>
                    <h:inputText value="#{row.wed}" size="10" id="wed" styleClass="tsCol" />
                    <f:facet name="footer">#{modifyTimesheet.totalWed}</f:facet>
                </h:column> 
                <h:message for="wed"/>
                <h:column>
                    <f:facet name="header">#{msgs.timesheetThu}</f:facet>
                    <h:inputText value="#{row.thu}" size="10" id="thu" styleClass="tsCol" />
                    <f:facet name="footer">#{modifyTimesheet.totalThu}</f:facet>
                </h:column>
                <h:message for="thu"/>
                <h:column>
                    <f:facet name="header">#{msgs.timesheetFri}</f:facet>
                    <h:inputText value="#{row.fri}" size="10" id="fri" styleClass="tsCol" />
                    <f:facet name="footer">#{modifyTimesheet.totalFri}</f:facet>
                </h:column>
                <h:message for="fri"/>
                <h:column>
                    <f:facet name="header">#{msgs.timesheetNotes}</f:facet>
                    <h:inputText value="#{row.notes}" size="10" style="width: 200px" />
                    <f:facet name="footer"></f:facet>
                </h:column>
            </h:dataTable>
            <h:commandButton value="#{msgs.add}" action="#{modifyTimesheet.addRow}" />
            <h:commandButton value="#{msgs.delete}" action="#{modifyTimesheet.deleteRow}" />
            <h:commandButton value="#{msgs.save}" action="#{modifyTimesheet.saveAction}" />
            <h:commandButton value="#{msgs.viewTimesheet}" action="viewTimesheet" />
            <h:commandButton value="#{msgs.logoutTitle}" action="#{login.logout}" />
            </h:form>
            <h:outputText value="#{msgs.errorRow}" rendered="#{timesheetManager.errorRow}" styleClass="error"/>
    </h:body>
</html>